<template>
	<div>
		<div class="herder">
			动态分类：{{info.actTypeStr}}
		</div>
		<div class="content" v-html="content">
		</div>
		<!-- <u-parse :content="info.content"></u-parse> -->
	</div>
</template>

<script>
	import {
		trendsGetInfo,
	} from '@/api/securityDynamicManagement.js'
	export default {
		data() {
			return {
				info: {},
				content: ''
			}
		},
		onLoad(option) {
			console.log(option);
			uni.setNavigationBarTitle({
				title: option.title
			})
			this.getInfo(option.id)
		},
		methods: {
			async getInfo(id) {
				const res = await trendsGetInfo({
					id: id
				})
				this.info = res.datas
				this.content = res.datas.content.replace(/<img\s+([^>]*?)>/gi, '<img $1 class="content-img"  style ="width:100%;height: auto">');
				console.log(this.info);
			}
		}
	}
</script>

<style lang="scss" scoped>
	.herder {
		padding: 20rpx 10rpx;
		font-size: 30rpx;
		font-weight: bold;
		border-bottom: 1rpx solid #eee;
	}

	.content {
		font-size: 26rpx;
		padding: 20rpx 10rpx;
		line-height: 40rpx;
	}

	.content-img {
		width: 750rpx !important;
		height: auto !important;
	}
</style>